package com.zznj.xzjc.adapter.index;

import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.zznj.xzjc.R;
import com.zznj.xzjc.bean.index.AnYuKuCasePartData;
import com.zznj.xzjc.utils.StringUtils;
import com.zznj.xzjc.utils.TimeUtils;

import java.util.List;

/**
 * 描述：添加类的描述
 *
 * @author wx5e48d604c2885118
 * @time 2020/4/7
 */
public class DsrAykAdapter extends BaseQuickAdapter<AnYuKuCasePartData, BaseViewHolder> {

    public DsrAykAdapter(int layoutResId, @Nullable List<AnYuKuCasePartData> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(BaseViewHolder helper, AnYuKuCasePartData item) {
        helper.setText(R.id.tv_name,StringUtils.toStringForWu(item.getName()));
        helper.setText(R.id.tv_sfz,StringUtils.toStringForWu(item.getIdsNo()));
        helper.setText(R.id.tv_sex,StringUtils.toStringForWu(item.getSexName()));
        helper.setText(R.id.tv_csrq, TimeUtils.getTime(item.getBirthday(),"yyyy-MM-dd"));
        helper.setText(R.id.tv_lxdh,StringUtils.toStringForWu(item.getTel()));
        helper.setText(R.id.tv_dwzw,StringUtils.toStringForWu(item.getProfession()));
        helper.setText(R.id.tv_whcd,StringUtils.toStringForWu(item.getEducationName()));
        helper.setText(R.id.tv_mingzu,StringUtils.toStringForWu(item.getNationName()));
        helper.setText(R.id.tv_tssf,StringUtils.toStringForWu(item.getSpecialIdentityName()));
        helper.setText(R.id.tv_jiguan,StringUtils.toStringForWu(item.getBirthplace()));
        helper.setText(R.id.tv_hujidi,StringUtils.toStringForWu(item.getResidence()));
        helper.setText(R.id.tv_xzz,StringUtils.toStringForWu(item.getAddress()));
    }
}
